import matplotlib.pyplot as plt

# 公式生成 数列1
ax_x = [a for a in range(1, 10)]
ax_y = []
ax_color = []
for i in ax_x:
    y = i * 2
    ax_y.append(y)
    if y > 10:
        ax_color.append("red")
    else:
        ax_color.append("green")

plt.style.use("seaborn")
fig, axes = plt.subplots()
axes.scatter(ax_x, ax_y, s=10, c=ax_color)
plt.show()
